#include<stdio.h>
#include<math.h>
int main()
{
    int n,t,i;
    double ans;
    double sum;
    scanf("%d",&t);getchar();
    while(t--)
    {
        scanf("%d",&n);getchar();
        sum=ans=0;
        sum=log(n);
        ans=log(sum);
        printf("%.0lf\n",fabs(ans));
    }
    printf("\n");
    return 0;
}
